# Contributor: Shawn Johnson <sjohnson@axiomega.com>
# Maintainer: Shawn Johnson <sjohnson@axiomega.com>
pkgname=bwrap-oci
pkgver=0.2
pkgrel=0
pkgdesc="Run an OCI container using Bubblewrap"
url="https://github.com/projectatomic/bwrap-oci"
arch="all"
license="LGPL-2.0-or-later"
options="!check" # there is no test suite/unit tests
makedepends="autoconf automake libcap-dev json-glib-dev libseccomp-dev docbook-xsl"
depends="bubblewrap"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/projectatomic/bwrap-oci/archive/$pkgname-$pkgver.tar.gz
	musl.patch"
builddir="$srcdir/$pkgname-$pkgname-$pkgver"

prepare() {
	default_prepare
	NOCONFIGURE=1 ./autogen.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

package() {
	make install DESTDIR="$pkgdir"
}

sha512sums="28b7dc753650ccaa5aca84d37d4a7e8ff21ad6b16321c17a4b41dbd3537ed578ec8a350b5da14afce176d56524640abde976d53f022662dcb89125c684581013  bwrap-oci-0.2.tar.gz
2baea5576fdcaf7ae4d37e212d2084f466ad8a1d3e265c2087404e11fb2453c94a0e70d33c8ceeb5557810f8766f5c0117473a320c5bfca7d151d76b5d34af67  musl.patch"
